﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="RegisterCoporation.aspx.cs" Inherits="DoAnWeb.RegisterCoporation" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register assembly="MSCaptcha" namespace="MSCaptcha" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table class="style1">
        <tr>
            <td colspan="2" style="text-align: left; font-size: 20px;" >
                <div class ="MenuRegister" style="float:left; list-style:none; width:100%">
                    <ul style="float:left; list-style:none; margin-top: 30px; width:100%; margin-bottom: 21px;">
                        <li>
                            <a href="~/RegisterCoporation.aspx"></a>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/RegisterCoporation.aspx"><font color="Red">Doanh nghiệp</font></asp:HyperLink>
                        </li>  
                        <li>
                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/RegisterMemBer.aspx"><font color="Black" >Người dùng thường</font></asp:HyperLink>
                        </li>
                    </ul>
                </div>
            </td>
        </tr>
        <tr>
            <td class="style2" colspan="2" 
                style="text-align: center; font-size: 33px; background-color: #CCCCFF;">
                <strong>Đăng ký tài khoản</strong></td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Tên tài khoản :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtTenTaiKhoan" runat="server" Width="153px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvTenTaiKhoan" runat="server" 
                    ControlToValidate="txtTenTaiKhoan" ErrorMessage="Chưa nhập tên tài khoản" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Mật khẩu :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtMatKhauMoi" runat="server" Width="154px" 
                    TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvMatKhauMoi" runat="server" 
                    ControlToValidate="txtMatKhauMoi" ErrorMessage="Chưa nhập mật khẩu mới vào" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="cvKiemTraMatKhau" runat="server" 
                    ControlToCompare="txtTenTaiKhoan" ControlToValidate="txtMatKhauMoi" 
                    Display="Dynamic" ErrorMessage="Mật khẩu không được giống với tài khoản" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True" 
                    Operator="NotEqual">*</asp:CompareValidator>
                <asp:CustomValidator ID="ctvMatKhau" runat="server" 
                    ClientValidationFunction="CheckPassword" ControlToValidate="txtMatKhauMoi" 
                    Display="Dynamic" ErrorMessage="Mật khẩu phải hơn 8 ký tự" Font-Bold="True" 
                    ForeColor="Red" SetFocusOnError="True">*</asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Nhập lại mật khẩu :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtNhapLai" runat="server" Width="155px" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvNhapLai" runat="server" 
                    ControlToValidate="txtNhapLai" ErrorMessage="Chưa nhập lại mật khẩu mới" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="cpvNhapLai" runat="server" 
                    ControlToCompare="txtMatKhauMoi" ControlToValidate="txtNhapLai" 
                    Display="Dynamic" ErrorMessage="Mật khẩu nhập lại không đúng" Font-Bold="True" 
                    ForeColor="Red" SetFocusOnError="True">*</asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="style5" style="padding: 5px; font-weight: bold;" align="right">
                Mã xác nhận :</td>
            <td class="style3" style="padding: 5px">
                <cc1:CaptchaControl ID="CaptchaControl1" runat="server" Width="186px" />
            </td>
        </tr>
        <tr>
            <td class="style5" style="padding: 5px; font-weight: bold;" align="right">
                Nhập mã xác nhận :</td>
            <td class="style3" style="padding: 5px">
                <asp:TextBox ID="txtMaXacNhan" runat="server" Width="164px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="frvMaXacNhan" runat="server" 
                    ControlToValidate="txtMaXacNhan" 
                    ErrorMessage="Chưa nhập mã xác nhận hoặc nhập chưa đúng" ForeColor="Red" 
                    SetFocusOnError="True" Display="Dynamic">*</asp:RequiredFieldValidator>
                <asp:CustomValidator ID="cvMaXacNhan" runat="server" 
                    ControlToValidate="txtMaXacNhan" ErrorMessage="Mã xác nhận không đúng" 
                    Font-Bold="True" ForeColor="Red" onservervalidate="cvMaXacNhan_ServerValidate" 
                    SetFocusOnError="True">*</asp:CustomValidator>
            </td>
        </tr>
        <tr id="TenDoanhNghiep">
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Tên Doanh nghiệp :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtTenDoanhNghiep" runat="server" Width="241px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvTenDN" runat="server" 
                    ControlToValidate="txtTenDoanhNghiep" ErrorMessage="Chưa nhập tên doanh nghiệp" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" valign="top" 
                align="right">
                Ngày sinh :</td>
            <td style="padding: 5px">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate >
                        
                  
                        <asp:TextBox ID="txtNgaySinh" runat="server"></asp:TextBox>
                        <cc2:CalendarExtender ID="CalendarExtender1" TargetControlID ="txtNgaySinh" 
                            PopupButtonID ="ImageButton1" Format="MM/dd/yyyy" runat="server">
                        </cc2:CalendarExtender>
                        <asp:ImageButton ID="ImageButton1" ImageUrl="/images/Calendar_scheduleHS.png" AlternateText="Click here to display calendar" runat="server" />
                        <asp:RequiredFieldValidator ID="rfvNgaySinh" runat="server" 
                            ControlToValidate="txtNgaySinh" ErrorMessage="Chưa nhập ngày sinh" 
                            Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                  </ContentTemplate>
                </asp:UpdatePanel>
                    </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Giới tính :</td>
            <td style="padding: 5px">
                <asp:RadioButton ID="rdNam" runat="server" Text="Nam"  Checked ="True"/>
&nbsp;&nbsp;
                <asp:RadioButton ID="rdNu" runat="server" Text="Nữ" />
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right" 
                valign="top">
                Địa chỉ :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtDiaChi" runat="server" Height="59px" TextMode="MultiLine" 
                    Width="328px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvDiaChi" runat="server" 
                    ControlToValidate="txtDiaChi" ErrorMessage="Bạn chưa nhập địa chỉ" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Điện thoại :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtDienThoai" runat="server" Width="154px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvDienThoai" runat="server" 
                    ControlToValidate="txtDienThoai" ErrorMessage="Chưa nhập điện thoại" 
                    Font-Bold="True" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px; font-weight: bold;" align="right">
                Email :</td>
            <td style="padding: 5px">
                <asp:TextBox ID="txtEmail" runat="server" Width="291px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvEmail" runat="server" 
                    ControlToValidate="txtEmail" ErrorMessage="Chưa nhập email" Font-Bold="True" 
                    ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revEmail" runat="server" 
                    ControlToValidate="txtEmail" Display="Dynamic" 
                    ErrorMessage="Email nhập không đúng" Font-Bold="True" ForeColor="Red" 
                    SetFocusOnError="True" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px">
                &nbsp;</td>
            <td style="padding: 5px">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style6" style="padding: 5px">
                <asp:Button ID="btnDangKy" runat="server" Height="36px" Text="Đăng ký" 
                    Width="147px" onclick="btnDangKy_Click" />
            </td>
            <td style="padding: 5px" align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnHuy" runat="server" Height="36px" 
                    Text="Hủy" Width="90px" CausesValidation="False" 
                    PostBackUrl="~/Default.aspx" />
            </td>
        </tr>
        <tr>
            <td class="style4" style="padding: 5px" colspan="2">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
